//
//  HTTPTool.h
//  UI_HLJ_Frame
//
//  Created by  毕宏伟 on 15/6/29.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, HTTPStyle)
{
    HTTP,
    JSON,
    XML,
    
    //对应的数据室0 ,1 ,2,
    
    
};


typedef NS_ENUM(NSInteger, RequestBodyStyle)
{
    BodyHTTP,
    BodyJSON,
    
    
};



@interface HTTPTool : NSObject

+ (void)get:(NSString *)url
       body:(id)body
 httpResult:(HTTPStyle)style
    success:(void(^)(id result))success
    failure:(void(^)(NSError *error)) failure;


+ (void)post:(NSString *)url
       body:(id)body
 httpResult:(HTTPStyle)style
requestBodyStyle:(RequestBodyStyle)bodyStyle
    success:(void(^)(id result))success
     failure:(void(^)(NSError *error)) failure;


@end
